# Reference: <https://postmarketos.org/devicepkg>
pkgname=device-samsung-hero2lte
pkgdesc="Samsung Galaxy S7 edge"
pkgver=2
pkgrel=0
url="https://postmarketos.org"
license="MIT"
arch="aarch64"
options="!check !archcheck"
depends="
	postmarketos-base
	linux-samsung-hero2lte
	mkbootimg
	msm-fb-refresher
"
makedepends="devicepkg-dev"
source="deviceinfo initfs-hook.sh"
subpackages="$pkgname-nonfree-firmware:nonfree_firmware"

build() {
	devicepkg_build $startdir $pkgname
}

package() {
	devicepkg_package $startdir $pkgname
}

nonfree_firmware() {
	pkgdesc="Non-free firmware for Wi-Fi on the Samsung Galaxy S7 (edge)"
	depends="firmware-samsung-hero"
	mkdir "$subpkgdir"
}

sha512sums="
ec83736d2971766e7159e4295dde32a1d22fa100d30b7f4380ba7e5d69ef75419c19b70177e1581cb9707429d705eaaa3d5d21a21f0354b43f729f1f67fef03d  deviceinfo
5a7be3cb8835ffb3783fcd4539de04f7f006c726ac9aea35cdca9e90b2877dc36cf4e314851bf9078f4b2dac061b7265866792d92a79f5232c56a0e17f7910b1  initfs-hook.sh
"
